Wrap osc8 to make the url clickable in terminal - #1699
Open
phanen wants to merge 1 commit into
Open
Conversation
phanen
force-pushed
the
osc8
branch
2 times, most recently
from
March 23, 2026 14:20
7ae51a1 to
ff57d50
Compare
|
Rebased this against current |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new output emits raw OSC 8 control sequences unconditionally and without sanitization, which can break redirected output and introduces terminal escape injection risk.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
oauth/src/lib.rs:470
- This prints OSC 8 escape sequences unconditionally. When stdout is redirected (logs, pipes) or on terminals without OSC 8 support, this will emit raw control characters. Also, if the URL ever contains control chars (e.g., ESC/BEL), it can break out of the hyperlink sequence and potentially inject terminal control codes; sanitizing and only emitting OSC 8 when stdout is a terminal avoids that.
println!("Browse to: \x1b]8;;{auth_url}\x1b\\{auth_url}\x1b]8;;\x1b\\",);
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
Member
|
While it rebases fine but, it's missing support for the latest stuff at Line 619 in a1b66d3 |
Member
|
@copilot Add a changelog entry for this PR in CHANGELOG.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda